#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int compare_place(int x, int y)
{
	int count = 0;
	int i = 0;
	int x_place = 0;
	int y_place = 0;
	for (i = 0; i < 32; i++)
	{
		if (((x >> i) & 1) != ((y >> i) & 1))
			count++;
	}
	return count;
}

int main()
{
	int a = 0;
	int b = 0;
	int num = 0;
	scanf("%d %d", &a, &b);
	num = compare_place(a, b);
	printf("%d", num);
	return 0;
}